package io.renren.modules.hospital.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.hospital.dao.JdDao;
import io.renren.modules.hospital.entity.JdEntity;
import io.renren.modules.hospital.service.JdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("jdService")
public class JdServiceImpl extends ServiceImpl<JdDao, JdEntity> implements JdService {

    @Autowired
    JdDao jdDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<JdEntity> page = this.page(
                new Query<JdEntity>().getPage(params),
                new QueryWrapper<JdEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<JdEntity> getMedicalNodeById(Integer jdId) {
         return jdDao.getMedicalNodeById(jdId);
    }

}
